<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>欢迎来到 Yobol 注册页面</title>

		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/commons.css" />
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/register.css" />
	</head>

	<body>
		<%
			//从转发的请求信息中获取到msg属性值
			String msg = (String)request.getAttribute("msg");
			if(msg != null){
				if(msg.equals("该用户名已存在")){
		%>
			<script>alert("该用户名已存在");</script>
		<%
				}
			}
		%>
		
		<div id="main_container">
			<div id="main">
				<div id="main_top">
					<a id="logo" href="<%=request.getContextPath()%>/index.jsp" title="返回首页"></a>
			</div>
				<div id="main_center">
					<div id="register">
						<form action="<%=request.getContextPath()%>/RegisterServlet" method="post">
							<%
								if (request.getHeader("referer") != null) {//从别的页面跳转过来
							%>
								<input type="hidden" name="returnUrl" value="<%=request.getHeader("referer")%>" />
							<%
								}
							%>
							<div>
								<label for="uName">用户名</label><input id="uName" type="text" name="uName" placeholder="请输入用户名" title="只能包含4-20位以字母开头,可包含字母，数字，小数点和下划线的字串" />
							</div>
							<div>
								<label for="uPwd">密码</label><input id="uPwd" type="password" name="uPwd" placeholder="请输入密码" title="只能包含6-20位包含字母，数字，小数点和下划线的字串" />
							</div>
							<div>
								<label for="uPwdConfirm">确认密码</label><input id="uPwdConfirm" type="password" name="uPwdConfirm" placeholder="请再次输入密码">
							</div>
							<div>
								<input type="submit" value="提交" />
							</div>
						</form>
					</div>
					<div id="third_party_login">
						<a href="http://www.baidu.com" title="第三方登录——QQ">QQ</a>
						<a href="http://www.baidu.com" title="第三方登录——微信">微信</a>
						<a href="http://www.baidu.com" title="第三方登录——微博">微博</a>
						<a href="http://www.baidu.com" title="第三方登录——百度">百度</a>
					</div>
				</div>
	
				<div id="main_bottom">
					<a href="<%=request.getContextPath()%>/pages/login.jsp">已经有账号?马上登录</a>
				</div>
			</div>
		</div>
	
	<script type="text/javascript" src="<%=request.getContextPath()%>/jQuery/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/jQuery/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/register.js"></script>
</body>
</html>
